﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;

namespace AF_Web
{
    public static class Distribute
    {
        public static string GetClientIP()
        {
            HttpRequest Request = System.Web.HttpContext.Current.Request;
            string result = "";
            if (Request.Headers["X-Real-IP"] != null)
            {
                result = Request.Headers["X-Real-IP"];
            }
            else
            {
                result = Request.UserHostAddress;
            }
            return result;
        }
    }
}
